---@diagnostic disable: lowercase-global, undefined-global, trailing-space

---@type api_particle
local Particle = require('core_avatar_bh_mobius/api/particle')

---@type data_particle[]
local data = {
    {
        prefab                 = 'particle_steam_discount',
        is_mod_texture         = true,
        texture                = 'fx/steam_discount.tex',
        texture_num_col        = 10,
        texture_num_row        = 1,
        enable_envelope_colour = true,
        enable_envelope_scale  = true,
        envelope_colour        = {
            {{0, {1,1,1,.3}},{.7, {1,1,1,1}},{1, {1,1,1,0}}},
        },
        envelope_scale = {
            Particle:genLerpEnvelopeScale(2,3,.2),
        },
        custom_every_particle_style = false,
        custom_every_particle_style_use_same_envelope = true,
        custom_every_particle_style_false = {
            rotationstatus        = true,
            maxnum                = 800,
            life                  = 5,
            blendmode             = BLENDMODE.Premultiplied,
            enable_ground_physics = false,
            sort_offset           = 0,
            sort_order            = 0,
            enablebloompass       = true,
            acceleration          = {0,0,0},
            dragcoefficient       = .02,
        },
        emitter_type = {
            type  = 'delay',
            delay = 0.5,
        },
        emit_when_spawn = true,
        emit_fn = function (inst)
            for i = 0,9 do
                local num_to_emit = 2
                while num_to_emit>0 do
                    Particle:emitParticle(inst,0,4,nil,nil,i/10,0,function ()
                        local px, pz = CreateCircleEmitter(5)()
                        local py = 5
                        local vx, vy, vz = 0, -.1, 0
                        return px, py, pz, vx, vy, vz
                    end)
                    num_to_emit = num_to_emit - 1
                end
            end
        end
    },
}

return unpack(Particle:MakeParticles(data))